/**
 * Created by sd on 2017/2/22.
 */
import {
  HIDELOADING,
  LOADING
} from './types'

const state = {
  loading: false,
  serviceTabStatus: 0,
  cardStatus: 0,
  isIponeX: false
};

const mutations = {
  [LOADING](state) {
    state.loading = true;
  },
  [HIDELOADING](state) {
    state.loading = false;
  },
  serviceTabStatus(state, status) {
    state.serviceTabStatus = status
  },
  cardStatus(state, status) {
    state.cardStatus = status
  },
  checkOutIponeX(state, status) {
    state.isIponeX = status
  }
};

const getters = {
  loading: (state) => {
    return state.loading
  }
}

export default {
  state,
  mutations,
  getters
}
